3.451 \(\int \frac {\sec ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx\)

Optimal. Leaf size=59 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{b d}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b d} \]

[Out]

arctanh(sin(d*x+c))/b/d-arctanh(sin(d*x+c)*(a-b)^(1/2)/a^(1/2))*(a-b)^(1/2)/b/d/a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3676, 391, 206, 208} \[ \frac {\tanh ^{-1}(\sin (c+d x))}{b d}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3/(a + b*Tan[c + d*x]^2),x]

[Out]

ArcTanh[Sin[c + d*x]]/(b*d) - (Sqrt[a - b]*ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]])/(Sqrt[a]*b*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 391

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\sec ^3(c+d x)}{a+b \tan ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a-(a-b) x^2\right )} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{b d}-\frac {(a-b) \operatorname {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\sin (c+d x)\right )}{b d}\\ &=\frac {\tanh ^{-1}(\sin (c+d x))}{b d}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 53, normalized size = 0.90 \[ \frac {\tanh ^{-1}(\sin (c+d x))-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a}}}{b d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3/(a + b*Tan[c + d*x]^2),x]

[Out]

(ArcTanh[Sin[c + d*x]] - (Sqrt[a - b]*ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]])/Sqrt[a])/(b*d)

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 169, normalized size = 2.86 \[ \left [\frac {\sqrt {\frac {a - b}{a}} \log \left (-\frac {{\left (a - b\right )} \cos \left (d x + c\right )^{2} + 2 \, a \sqrt {\frac {a - b}{a}} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right ) + \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, b d}, \frac {2 \, \sqrt {-\frac {a - b}{a}} \arctan \left (\sqrt {-\frac {a - b}{a}} \sin \left (d x + c\right )\right ) + \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, b d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+b*tan(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/2*(sqrt((a - b)/a)*log(-((a - b)*cos(d*x + c)^2 + 2*a*sqrt((a - b)/a)*sin(d*x + c) - 2*a + b)/((a - b)*cos(
d*x + c)^2 + b)) + log(sin(d*x + c) + 1) - log(-sin(d*x + c) + 1))/(b*d), 1/2*(2*sqrt(-(a - b)/a)*arctan(sqrt(
-(a - b)/a)*sin(d*x + c)) + log(sin(d*x + c) + 1) - log(-sin(d*x + c) + 1))/(b*d)]

________________________________________________________________________________________

giac [A]  time = 1.84, size = 88, normalized size = 1.49 \[ -\frac {\frac {2 \, {\left (a - b\right )} \arctan \left (-\frac {a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} b} - \frac {\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{b} + \frac {\log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{b}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+b*tan(d*x+c)^2),x, algorithm="giac")

[Out]

-1/2*(2*(a - b)*arctan(-(a*sin(d*x + c) - b*sin(d*x + c))/sqrt(-a^2 + a*b))/(sqrt(-a^2 + a*b)*b) - log(abs(sin
(d*x + c) + 1))/b + log(abs(sin(d*x + c) - 1))/b)/d

________________________________________________________________________________________

maple [B]  time = 0.61, size = 111, normalized size = 1.88 \[ -\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right ) a}{d b \sqrt {a \left (a -b \right )}}+\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{d \sqrt {a \left (a -b \right )}}-\frac {\ln \left (-1+\sin \left (d x +c \right )\right )}{2 d b}+\frac {\ln \left (\sin \left (d x +c \right )+1\right )}{2 d b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3/(a+b*tan(d*x+c)^2),x)

[Out]

-1/d/b/(a*(a-b))^(1/2)*arctanh((a-b)*sin(d*x+c)/(a*(a-b))^(1/2))*a+1/d/(a*(a-b))^(1/2)*arctanh((a-b)*sin(d*x+c
)/(a*(a-b))^(1/2))-1/2/d/b*ln(-1+sin(d*x+c))+1/2/d/b*ln(sin(d*x+c)+1)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+b*tan(d*x+c)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is b-a positive or negative?

________________________________________________________________________________________

mupad [B]  time = 12.67, size = 67, normalized size = 1.14 \[ \frac {2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{b\,d}-\frac {\mathrm {atanh}\left (\frac {\sin \left (c+d\,x\right )\,\sqrt {a-b}}{\sqrt {a}}\right )\,\sqrt {a-b}}{\sqrt {a}\,b\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^3*(a + b*tan(c + d*x)^2)),x)

[Out]

(2*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(b*d) - (atanh((sin(c + d*x)*(a - b)^(1/2))/a^(1/2))*(a - b)^
(1/2))/(a^(1/2)*b*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{3}{\left (c + d x \right )}}{a + b \tan ^{2}{\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3/(a+b*tan(d*x+c)**2),x)

[Out]

Integral(sec(c + d*x)**3/(a + b*tan(c + d*x)**2), x)

________________________________________________________________________________________